
<div class="layui-card first_step" style="">
    <div class="layui-progress" lay-showPercent="true" style="margin: 20px 200px;">
        <div class="layui-progress-bar layui-bg-green" lay-percent="1/3"></div>
    </div>

{{--    <div class="layui-form-item">--}}
{{--        <label for="" class="layui-form-label">商品分类</label>--}}
{{--        <div class="layui-input-inline">--}}
{{--            <select name="category_id" lay-verify="required" id="category_id"  lay-filter="category_id" >--}}
{{--                <option value=""></option>--}}
{{--                @foreach($categorys as $category)--}}
{{--                    <option value="{{ $category->id }}" @if(isset($goods->category_id)&&$goods->category_id==$category->id)selected @endif >{{ $category->category_name }}</option>--}}
{{--                    @if(isset($category->allChilds)&&!$category->allChilds->isEmpty())--}}
{{--                        @foreach($category->allChilds as $child)--}}
{{--                            <option value="{{ $child->id }}" @if(isset($article->category_id)&&$article->category_id==$child->id)selected @endif >&nbsp;&nbsp;&nbsp;┗━━{{ $child->category_name }}</option>--}}
{{--                            @if(isset($child->allChilds)&&!$child->allChilds->isEmpty())--}}
{{--                                @foreach($child->allChilds as $third)--}}
{{--                                    <option value="{{ $third->id }}" @if(isset($article->category_id)&&$article->category_id==$third->id)selected @endif >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;┗━━{{ $third->category_name }}</option>--}}
{{--                                @endforeach--}}
{{--                            @endif--}}
{{--                        @endforeach--}}
{{--                    @endif--}}
{{--                @endforeach--}}
{{--            </select>--}}
{{--        </div>--}}
{{--    </div>--}}

    <div class="layui-form-item">
        <label for="" class="layui-form-label">一级分类</label>
        <div class="layui-input-inline">
            <select name="first_category_id" lay-verify="required" id="first_category_id"  lay-filter="first_category_id" >
                <option value=""></option>
                @foreach($first_category_arr as $category)
                    <option value="{{ $category["id"] }}" @if(isset($goods["first_category_id"]) && ($goods["first_category_id"] == $category["id"])) selected @endif >{{ $category["category_name"] }}</option>
                @endforeach
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">二级分类</label>
        <div class="layui-input-inline">
            <select name="second_category_id" lay-verify="required" id="second_category_id"  lay-filter="second_category_id" >
                <option value=""></option>
                @foreach($second_category_arr as $category)
                    <option value="{{ $category["id"] }}" @if(isset($goods["second_category_id"]) && ($goods["second_category_id"] == $category["id"])) selected @endif >{{ $category["category_name"] }}</option>
                @endforeach
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">商品品牌</label>
        <div class="layui-input-inline">
            <select name="brand_id" lay-verify="required" id="brand_id">
                <option value=""></option>
                @foreach($brand_arr as $brand)
                    <option value="{{ $brand["id"] }}" @if(isset($goods["brand_id"]) && ($goods["brand_id"] == $brand["id"])) selected @endif >{{ $brand["brand_name"] }}</option>
                @endforeach
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">商品名称</label>
        <div class="layui-input-block">
            <input type="text" name="goods_name" value="{{$goods["goods_name"]??old('goods_name')}}" lay-verify="required" placeholder="请输入商品名称" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">标签</label>
        <div class="layui-input-block">
            @foreach($tags as $tag)
                <input type="checkbox" name="tags[]" {{ $tag->checked??'' }} value="{{ $tag->id }}" title="{{ $tag->name }}">
            @endforeach
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">商品卖点</label>
        <div class="layui-input-block">
            <input type="text" name="goods_selling" value="{{$goods["goods_selling"]??old('goods_selling')}}" lay-verify="required" placeholder="请输入商品卖点" class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">点击量</label>
        <div class="layui-input-block">
            <input type="number" name="hits" value="{{$goods["hits"]??mt_rand(100,500)}}" lay-verify="required|numeric"  class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <label for="" class="layui-form-label">官网售价</label>
        <div class="layui-input-block">
            <input type="number" name="price" value="{{$goods["price"]??old('price')}}"  value="" lay-verify="required|numeric"  class="layui-input" >
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn layui-btn-normal layui-btn-sm to_second_step">下一步</button>
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm ">完成</button>
        </div>
    </div>
</div>






